package com.kang.product;

import org.apache.rocketmq.spring.annotation.ExtRocketMQTemplateConfiguration;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.stereotype.Component;

/**
 * 如果要发送到额外的topic，则需要使用 @ExtRocketMQTemplateConfiguration
 */
@Component
@ExtRocketMQTemplateConfiguration()
//@ExtRocketMQConsumerConfiguration(topic="stock_consumer_group")
public class ExtRocketMQTemplateRroduct extends RocketMQTemplate {

    public void sendMessage(String topic,String msg) {
        this.convertAndSend(topic, msg);
    }

}
